# toolui.py

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(800, 650) # 增大默认尺寸
        font = QtGui.QFont()
        font.setFamily("微软雅黑")
        Dialog.setFont(font)
        
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0) # 无边距
        self.verticalLayout.setSpacing(0) # 无间距
        self.verticalLayout.setObjectName("verticalLayout")
        
        # 顶部导航栏
        self.listWidget = QtWidgets.QListWidget(Dialog)
        self.listWidget.setMinimumSize(QtCore.QSize(0, 50)) # 设置最小高度
        self.listWidget.setMaximumSize(QtCore.QSize(16777215, 50)) # 设置最大高度
        self.listWidget.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.listWidget.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.listWidget.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.listWidget.setFlow(QtWidgets.QListView.LeftToRight) # 水平排列
        self.listWidget.setObjectName("listWidget")
        self.verticalLayout.addWidget(self.listWidget)
        
        # 主内容区
        self.stackedWidget = QtWidgets.QStackedWidget(Dialog)
        self.stackedWidget.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.stackedWidget.setObjectName("stackedWidget")
        self.verticalLayout.addWidget(self.stackedWidget)
        
        self.verticalLayout.setStretch(1, 1) # 让stackedWidget占据剩余所有空间

        self.retranslateUi(Dialog)
        self.stackedWidget.setCurrentIndex(-1)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "留痕 - 2.0.5")) # 修改主窗口标题